using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Simnova.Collaborate.Presenter;
using Simnova.Collaborate.View;

public partial class FeedbackWorkaround : System.Web.UI.Page, IFeedbackWorkaround
{
    FeedbackWorkaroundPresenter _feedbackWorkaroundPresenter;

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        this._feedbackWorkaroundPresenter = new FeedbackWorkaroundPresenter(this, int.Parse(Request.QueryString["FeedbackId"].ToString()), int.Parse(Session["UserId"].ToString()));
    }

    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void SaveButton_Click(object sender, EventArgs e)
    {
        this._feedbackWorkaroundPresenter.Save();
    }

    #region IFeedbackWorkaround Members

    string IFeedbackWorkaround.Title
    {
        set { TitleLinkButton.Text = value; }
    }

    string IFeedbackWorkaround.Description
    {
        set { DescriptionLabel.Text = value; }
    }

    string IFeedbackWorkaround.Workaround
    {
        get
        {
            return WorkaroundTextBox.Text;
        }
        set
        {
            WorkaroundTextBox.Text = value;
        }
    }

    IList IFeedbackWorkaround.Workarounds
    {
        set 
        { 
            WorkaroundsDataList.DataSource = value;
            WorkaroundsDataList.DataBind();
        }
    }

    #endregion
    protected void TitleLinkButton_Click(object sender, EventArgs e)
    {
        Response.Redirect(@"FeedbackSummary.aspx?FeedbackId=" + Request.QueryString["FeedbackId"]);
    }
}
